inherited frmBom: TfrmBom
  Left = 341
  Top = 110
  Caption = #29289#26009#28165#21333
  ClientHeight = 553
  ClientWidth = 874
  Position = poScreenCenter
  ExplicitLeft = -82
  ExplicitTop = -59
  ExplicitWidth = 890
  ExplicitHeight = 592
  PixelsPerInch = 96
  TextHeight = 12
  inherited pnlBottom: TPanel
    Top = 507
    Width = 874
    Height = 46
    ExplicitTop = 507
    ExplicitWidth = 874
    ExplicitHeight = 46
    DesignSize = (
      874
      46)
    inherited btnOK: TcxButton
      Left = 680
      Top = 10
      Width = 90
      Anchors = [akTop, akRight]
      Caption = #20445#23384#36864#20986'(&O)'
      TabOrder = 4
      ExplicitLeft = 680
      ExplicitTop = 10
      ExplicitWidth = 90
    end
    inherited btnCancel: TcxButton
      Left = 780
      Top = 10
      Width = 80
      Anchors = [akTop, akRight]
      TabOrder = 5
      OnClick = btnCancelClick
      ExplicitLeft = 780
      ExplicitTop = 10
      ExplicitWidth = 80
    end
    object btnBomSet: TcxButton
      Left = 112
      Top = 10
      Width = 75
      Height = 25
      Caption = #20445#23384#29289#26009#35774#32622
      Enabled = False
      TabOrder = 1
      Visible = False
      OnClick = btnBomSetClick
    end
    object btnCheck: TcxButton
      Left = 200
      Top = 10
      Width = 75
      Height = 25
      Caption = #23457#26680
      TabOrder = 2
      Visible = False
      OnClick = btnCheckClick
    end
    object btnExcel: TcxButton
      Left = 12
      Top = 10
      Width = 75
      Height = 25
      Caption = #23548#20986'Excel'
      OptionsImage.Glyph.SourceDPI = 96
      OptionsImage.Glyph.Data = {
        424D360400000000000036000000280000001000000010000000010020000000
        000000000000C40E0000C40E00000000000000000000FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FF0000
        00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FF000000FF0000
        00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00848484FF848484FF848484FF848484FF848484FF848484FF8484
        84FF848484FF848484FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
        00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00840000FF8400
        00FFFF00FF00840000FFFF00FF00000000FFFF00FF00FF00FF00000000FF0000
        00FF000000FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00840000FFFF0000FF840000FFFF00
        00FF840000FFFF0000FF840000FFFF0000FFFF00FF00FF00FF00000000FFFF00
        FF00840000FFFF00FF00840000FF840000FFFF0000FF840000FFFF0000FF8400
        00FFFF0000FF840000FFFF0000FF840000FFFF00FF00FF00FF00000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00840000FFFF00
        00FF840000FFFF0000FF840000FFFF0000FF840000FFFF0000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF0000FF8400
        00FFFF0000FF840000FFFF0000FF840000FFFF0000FF840000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
      TabOrder = 0
      Visible = False
      OnClick = btnExcelClick
    end
    object btnSubRaw: TcxButton
      Left = 288
      Top = 10
      Width = 75
      Height = 25
      Caption = #23376#29289#26009#35774#32622
      Enabled = False
      TabOrder = 3
      Visible = False
      OnClick = btnSubRawClick
    end
    object chkShowPic: TcxCheckBox
      Left = 478
      Top = 12
      Caption = #26174#31034#26448#26009#22270#29255
      TabOrder = 6
      Transparent = True
      Visible = False
      OnClick = chkShowPicClick
    end
    object chkListPause: TcxCheckBox
      Left = 383
      Top = 12
      Caption = #26174#31034#20572#29992#29256#26412
      TabOrder = 7
      Transparent = True
      Visible = False
      OnClick = chkListPauseClick
    end
  end
  inherited Panel1: TPanel
    Width = 874
    Height = 56
    ExplicitWidth = 874
    ExplicitHeight = 56
    DesignSize = (
      874
      56)
    inherited labFuncName: TLabel
      Top = 5
      Width = 52
      Caption = #29289#26009#28165#21333
      Font.Color = clWindowText
      Visible = False
      ExplicitTop = 5
      ExplicitWidth = 52
    end
    inherited labFuncDesc: TLabel
      Left = 233
      Top = 21
      Width = 60
      Caption = #20135#21697#32534#30721#65306
      Font.Color = clWindowText
      ExplicitLeft = 233
      ExplicitTop = 21
      ExplicitWidth = 60
    end
    inherited img3: TImage
      Left = 1094
      Top = 2
      Width = 65
      Height = 65
      ExplicitLeft = 768
      ExplicitTop = 2
      ExplicitWidth = 65
      ExplicitHeight = 65
    end
    inherited Bevel1: TBevel
      Top = 53
      Width = 874
      ExplicitTop = 53
      ExplicitWidth = 837
    end
    object Label2: TLabel
      Left = 513
      Top = 21
      Width = 36
      Height = 12
      Caption = #35268#26684#65306
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object Label3: TLabel
      Left = 417
      Top = 21
      Width = 36
      Height = 12
      Caption = #21333#20301#65306
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object lblp_name: TLabel
      Left = 12
      Top = 21
      Width = 60
      Height = 12
      Caption = #20135#21697#21517#31216#65306
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object lblp_code: TLabel
      Left = 287
      Top = 21
      Width = 48
      Height = 12
      Caption = #20135#21697#32534#30721
      Font.Charset = ANSI_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object lblunitname: TLabel
      Left = 449
      Top = 21
      Width = 36
      Height = 12
      Caption = #21333#20301#65306
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object lblp_spec: TLabel
      Left = 547
      Top = 21
      Width = 36
      Height = 12
      Caption = #35268#26684#65306
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -12
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      Transparent = True
    end
    object edtProductBom: TcxDBLookupComboBox
      Tag = 10
      Left = 69
      Top = 17
      DataBinding.DataField = 'productid'
      DataBinding.DataSource = dsProduct
      Properties.ListColumns = <>
      TabOrder = 0
      Width = 145
    end
    object btnTem: TcxButton
      Left = 732
      Top = 15
      Width = 120
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #27169#29256
      DropDownMenu = pmTem
      Kind = cxbkDropDown
      TabOrder = 1
      Visible = False
    end
  end
  object pgcProductBom: TcxPageControl [2]
    Left = 0
    Top = 56
    Width = 874
    Height = 451
    Align = alClient
    TabOrder = 2
    Properties.ActivePage = tsBom
    Properties.CustomButtons.Buttons = <>
    OnChange = pgcProductBomChange
    ClientRectBottom = 447
    ClientRectLeft = 4
    ClientRectRight = 870
    ClientRectTop = 24
    object tsProduct: TcxTabSheet
      Caption = #21152#24037#20135#21697#20449#24687
      ImageIndex = 0
      object sptProductType: TcxSplitter
        Left = 185
        Top = 0
        Width = 8
        Height = 423
        Cursor = crHSplit
        HotZoneClassName = 'TcxSimpleStyle'
        HotZone.SizePercent = 45
        Control = treType
      end
      object grdProduct: TcxGrid
        Left = 193
        Top = 0
        Width = 673
        Height = 423
        Align = alClient
        TabOrder = 1
        object viewProduct: TcxGridDBTableView
          OnDblClick = viewProductDblClick
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = dsProductList
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Editing = False
          OptionsData.Inserting = False
          OptionsView.GroupByBox = False
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          object viewProductcode: TcxGridDBColumn
            Caption = #36135#21697#32534#30721
            DataBinding.FieldName = 'code'
            Width = 80
          end
          object viewProductname: TcxGridDBColumn
            Caption = #36135#21697#21517#31216
            DataBinding.FieldName = 'name'
            Width = 80
          end
          object viewProductspec: TcxGridDBColumn
            Caption = #35268#26684
            DataBinding.FieldName = 'spec'
            Width = 80
          end
          object viewProductkindname: TcxGridDBColumn
            Caption = #36135#21697#23646#24615
            DataBinding.FieldName = 'kindname'
            Width = 80
          end
          object viewProductdepotname: TcxGridDBColumn
            Caption = #40664#35748#20179#24211
            DataBinding.FieldName = 'depotname'
            Width = 80
          end
          object viewProductWorkShopid: TcxGridDBColumn
            Caption = #29983#20135#36710#38388
            DataBinding.FieldName = 'workshopid'
          end
          object viewProductbatch: TcxGridDBColumn
            Caption = #25209#21495#31649#29702
            DataBinding.FieldName = 'batch'
            Width = 50
          end
          object viewProductunitname: TcxGridDBColumn
            Caption = #22522#26412#21333#20301
            DataBinding.FieldName = 'unitname'
            Width = 60
          end
          object viewProductbarcode: TcxGridDBColumn
            Caption = #26465#30721
            DataBinding.FieldName = 'barcode'
            Width = 80
          end
          object viewProductcalccostname: TcxGridDBColumn
            Caption = #25104#26412#26680#31639
            DataBinding.FieldName = 'calccostname'
            Width = 80
          end
          object viewProductpurreprice: TcxGridDBColumn
            Caption = #21442#32771#36827#20215
            DataBinding.FieldName = 'purreprice'
            Width = 60
          end
        end
        object lvlProduct: TcxGridLevel
          GridView = viewProduct
        end
      end
      object pnlLeft: TPanel
        Left = 0
        Top = 0
        Width = 185
        Height = 423
        Align = alLeft
        BevelOuter = bvNone
        Caption = 'pnlLeft'
        TabOrder = 2
        object treType: TcxTreeView
          Left = 0
          Top = 0
          Width = 185
          Height = 318
          Align = alClient
          TabOrder = 0
          OnClick = treTypeClick
        end
        object rdgBomState: TcxRadioGroup
          Left = 0
          Top = 318
          Align = alBottom
          Properties.Items = <
            item
              Caption = #20840#37096#28165#21333
            end
            item
              Caption = #24050#23457#26680#28165#21333
            end
            item
              Caption = #26410#23457#26680#28165#21333
            end
            item
              Caption = #20840#37096#36135#21697
            end>
          ItemIndex = 0
          TabOrder = 1
          OnClick = rdgBomStateClick
          Height = 105
          Width = 185
        end
      end
    end
    object tsBom: TcxTabSheet
      Caption = #29289#26009#28165#21333
      ImageIndex = 1
      OnShow = tsBomShow
      object pnlBomVer: TPanel
        Left = 0
        Top = 0
        Width = 866
        Height = 119
        Align = alTop
        BevelOuter = bvNone
        TabOrder = 0
        object grdBomVer: TcxGrid
          Left = 0
          Top = 0
          Width = 652
          Height = 119
          Align = alClient
          TabOrder = 0
          OnEnter = grdBomVerEnter
          object viewBomVer: TcxGridDBTableView
            PopupMenu = pmBomVer
            OnDblClick = viewBomVerDblClick
            OnMouseDown = viewBomVerMouseDown
            Navigator.Buttons.CustomButtons = <>
            OnCanFocusRecord = viewBomVerCanFocusRecord
            DataController.DataSource = MainDataSource
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsBehavior.FocusCellOnTab = True
            OptionsBehavior.FocusFirstCellOnNewRecord = True
            OptionsBehavior.GoToNextCellOnEnter = True
            OptionsBehavior.FocusCellOnCycle = True
            OptionsBehavior.PullFocusing = True
            OptionsData.Appending = True
            OptionsData.CancelOnExit = False
            OptionsView.ShowEditButtons = gsebAlways
            OptionsView.GroupByBox = False
            OptionsView.Indicator = True
            OptionsView.IndicatorWidth = 25
            Styles.Background = MainDM.bslBackGroup
            Styles.ContentEven = MainDM.bsEven
            Styles.ContentOdd = MainDM.bsOdd
            Styles.Header = MainDM.bsTitle
            Styles.Selection = MainDM.bsSelect
            OnCustomDrawIndicatorCell = viewBomVerCustomDrawIndicatorCell
          end
          object lvlBomVer: TcxGridLevel
            GridView = viewBomVer
          end
        end
        object grdBomTrader: TcxGrid
          Left = 660
          Top = 0
          Width = 206
          Height = 119
          Align = alRight
          TabOrder = 2
          OnEnter = grdBomVerEnter
          object viewBomTrader: TcxGridDBTableView
            OnMouseDown = viewBomTraderMouseDown
            Navigator.Buttons.CustomButtons = <>
            DataController.DataSource = dsBomTrader
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsBehavior.FocusCellOnTab = True
            OptionsBehavior.FocusFirstCellOnNewRecord = True
            OptionsBehavior.GoToNextCellOnEnter = True
            OptionsBehavior.FocusCellOnCycle = True
            OptionsData.Appending = True
            OptionsView.ColumnAutoWidth = True
            OptionsView.GroupByBox = False
            Styles.Background = MainDM.bslBackGroup
            Styles.ContentEven = MainDM.bsEven
            Styles.ContentOdd = MainDM.bsOdd
            Styles.Header = MainDM.bsTitle
            Styles.Selection = MainDM.bsSelect
            object viewBomTradertraderid: TcxGridDBColumn
              DataBinding.FieldName = 'traderid'
              HeaderAlignmentHorz = taCenter
            end
            object viewBomTraderremark: TcxGridDBColumn
              DataBinding.FieldName = 'remark'
              HeaderAlignmentHorz = taCenter
              Width = 80
            end
          end
          object lvlBomTrader: TcxGridLevel
            GridView = viewBomTrader
          end
        end
        object cxSplitter1: TcxSplitter
          Left = 652
          Top = 0
          Width = 8
          Height = 119
          Cursor = crHSplit
          HotZoneClassName = 'TcxSimpleStyle'
          AlignSplitter = salRight
          Control = grdBomTrader
        end
      end
      object sptBomVer: TcxSplitter
        Left = 0
        Top = 119
        Width = 866
        Height = 8
        Cursor = crVSplit
        HotZoneClassName = 'TcxXPTaskBarStyle'
        HotZone.SizePercent = 55
        AlignSplitter = salTop
        Control = pnlBomVer
      end
      object pgcBom: TcxPageControl
        Left = 0
        Top = 127
        Width = 866
        Height = 296
        Align = alClient
        TabOrder = 2
        Properties.ActivePage = tsRaw
        Properties.CustomButtons.Buttons = <>
        OnPageChanging = pgcBomPageChanging
        ClientRectBottom = 292
        ClientRectLeft = 4
        ClientRectRight = 862
        ClientRectTop = 24
        object tsBomTree: TcxTabSheet
          Caption = #29289#26009#26641
          ImageIndex = 0
          OnShow = tsBomTreeShow
          object trvBom: TcxTreeView
            Left = 0
            Top = 0
            Width = 858
            Height = 268
            Align = alClient
            ParentFont = False
            TabOrder = 0
            OnClick = trvBomClick
            OnDblClick = trvBomDblClick
            HideSelection = False
            ReadOnly = True
            RowSelect = True
          end
        end
        object tsRaw: TcxTabSheet
          Caption = #26448#26009#21015#34920
          ImageIndex = 1
          OnShow = tsRawShow
          object grdRaw: TcxGrid
            Left = 0
            Top = 0
            Width = 858
            Height = 268
            Align = alClient
            TabOrder = 0
            OnEnter = grdBomVerEnter
            object viewRaw: TcxGridDBTableView
              PopupMenu = pmRawList
              OnMouseDown = viewRawMouseDown
              Navigator.Buttons.CustomButtons = <>
              DataController.DataSource = dsBom
              DataController.Summary.DefaultGroupSummaryItems = <>
              DataController.Summary.FooterSummaryItems = <
                item
                  Kind = skSum
                  FieldName = 'rawqty'
                  DisplayText = #24635#25968#65306
                end>
              DataController.Summary.SummaryGroups = <>
              OptionsBehavior.AlwaysShowEditor = True
              OptionsBehavior.FocusCellOnTab = True
              OptionsBehavior.FocusFirstCellOnNewRecord = True
              OptionsBehavior.GoToNextCellOnEnter = True
              OptionsBehavior.FocusCellOnCycle = True
              OptionsBehavior.PullFocusing = True
              OptionsData.Appending = True
              OptionsSelection.MultiSelect = True
              OptionsSelection.CellMultiSelect = True
              OptionsSelection.InvertSelect = False
              OptionsView.ShowEditButtons = gsebForFocusedRecord
              OptionsView.CellTextMaxLineCount = 100
              OptionsView.Footer = True
              OptionsView.FooterMultiSummaries = True
              OptionsView.GroupByBox = False
              OptionsView.Indicator = True
              OptionsView.IndicatorWidth = 25
              Preview.MaxLineCount = 0
              Styles.Background = MainDM.bslBackGroup
              Styles.ContentEven = MainDM.bsEven
              Styles.ContentOdd = MainDM.bsOdd
              Styles.Footer = MainDM.bsTitle
              Styles.Header = MainDM.bsTitle
              Styles.Selection = MainDM.bsSelect
              OnCustomDrawIndicatorCell = viewBomVerCustomDrawIndicatorCell
            end
            object lvlRaw: TcxGridLevel
              GridView = viewRaw
            end
          end
        end
        object tsWorkProc: TcxTabSheet
          Caption = #24037#24207
          ImageIndex = 2
          object grdWorkProc: TcxGrid
            Left = 0
            Top = 0
            Width = 858
            Height = 268
            Align = alClient
            TabOrder = 0
            OnEnter = grdBomVerEnter
            object viewWorkProc: TcxGridDBTableView
              PopupMenu = pmWorkProc
              OnMouseDown = viewWorkProcMouseDown
              Navigator.Buttons.CustomButtons = <>
              DataController.DataModeController.SmartRefresh = True
              DataController.DataSource = dsWorkProc
              DataController.Summary.DefaultGroupSummaryItems = <>
              DataController.Summary.FooterSummaryItems = <>
              DataController.Summary.SummaryGroups = <>
              OptionsBehavior.FocusCellOnTab = True
              OptionsBehavior.FocusFirstCellOnNewRecord = True
              OptionsBehavior.GoToNextCellOnEnter = True
              OptionsBehavior.FocusCellOnCycle = True
              OptionsData.Appending = True
              OptionsView.ColumnAutoWidth = True
              OptionsView.Footer = True
              OptionsView.FooterMultiSummaries = True
              OptionsView.GroupByBox = False
              OptionsView.Indicator = True
              OptionsView.IndicatorWidth = 25
              Styles.Background = MainDM.bslBackGroup
              Styles.ContentEven = MainDM.bsEven
              Styles.ContentOdd = MainDM.bsOdd
              Styles.Footer = MainDM.bsTitle
              Styles.Header = MainDM.bsTitle
              Styles.Selection = MainDM.bsSelect
              OnCustomDrawIndicatorCell = viewBomVerCustomDrawIndicatorCell
            end
            object lvlWorkProc: TcxGridLevel
              GridView = viewWorkProc
            end
          end
        end
        object tsRawTreeList: TcxTabSheet
          Caption = #21512#24182#26448#26009#21015#34920
          ImageIndex = 3
          OnShow = tsRawTreeListShow
          object grdTree: TcxGrid
            Left = 0
            Top = 0
            Width = 858
            Height = 268
            Align = alClient
            TabOrder = 0
            object viewTree: TcxGridDBTableView
              Navigator.Buttons.CustomButtons = <>
              DataController.DataSource = dsTree
              DataController.Summary.DefaultGroupSummaryItems = <
                item
                  Kind = skSum
                  FieldName = 'rawqty'
                  Column = colSumrawqty
                end
                item
                  Kind = skSum
                  FieldName = 'wasterate'
                  Column = colSumWasterate
                end
                item
                  Kind = skSum
                  FieldName = 'rawquantity'
                  Column = colSumRawQuantity
                end>
              DataController.Summary.FooterSummaryItems = <
                item
                  Kind = skSum
                  FieldName = 'rawqty'
                  Column = colSumrawqty
                end
                item
                  Kind = skSum
                  FieldName = 'sumqty'
                  Column = colSumqty
                end
                item
                  Kind = skSum
                  FieldName = 'rawquantity'
                  Column = colSumRawQuantity
                end>
              DataController.Summary.SummaryGroups = <>
              OptionsBehavior.AlwaysShowEditor = True
              OptionsBehavior.FocusCellOnTab = True
              OptionsBehavior.FocusFirstCellOnNewRecord = True
              OptionsBehavior.GoToNextCellOnEnter = True
              OptionsBehavior.FocusCellOnCycle = True
              OptionsData.Deleting = False
              OptionsData.Editing = False
              OptionsData.Inserting = False
              OptionsView.Footer = True
              OptionsView.FooterMultiSummaries = True
              OptionsView.GroupFooterMultiSummaries = True
              OptionsView.GroupSummaryLayout = gslAlignWithColumnsAndDistribute
              Styles.Background = MainDM.bslBackGroup
              Styles.ContentEven = MainDM.bsEven
              Styles.ContentOdd = MainDM.bsOdd
              Styles.Footer = MainDM.bsTitle
              Styles.GroupSummary = MainDM.bsTitle
              Styles.Header = MainDM.bsTitle
              Styles.Selection = MainDM.bsSelect
              object cxGridDBColumn1: TcxGridDBColumn
                DataBinding.FieldName = 'orderno'
                HeaderAlignmentHorz = taCenter
                Width = 30
              end
              object colSumVP_Code: TcxGridDBColumn
                Caption = #20135#21697#32534#30721
                DataBinding.FieldName = 'vp_code'
                HeaderAlignmentHorz = taCenter
                Width = 70
              end
              object colSumVP_Name: TcxGridDBColumn
                Caption = #20135#21697#21517#31216
                DataBinding.FieldName = 'vp_name'
                HeaderAlignmentHorz = taCenter
                Width = 70
              end
              object cxGridDBColumn2: TcxGridDBColumn
                DataBinding.FieldName = 'code'
                HeaderAlignmentHorz = taCenter
                Width = 80
              end
              object cxGridDBColumn3: TcxGridDBColumn
                DataBinding.FieldName = 'name'
                HeaderAlignmentHorz = taCenter
                Width = 80
              end
              object cxGridDBColumn4: TcxGridDBColumn
                DataBinding.FieldName = 'spec'
                HeaderAlignmentHorz = taCenter
                Width = 80
              end
              object cxGridDBColumn5: TcxGridDBColumn
                DataBinding.FieldName = 'unitname'
                HeaderAlignmentHorz = taCenter
                Width = 50
              end
              object colSumrawqty: TcxGridDBColumn
                DataBinding.FieldName = 'rawqty'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object colSumWasterate: TcxGridDBColumn
                Caption = #25439#32791#29575'%'
                DataBinding.FieldName = 'wasterate'
                HeaderAlignmentHorz = taCenter
                Width = 50
              end
              object colSumRawQuantity: TcxGridDBColumn
                Caption = #25968#37327'('#21547#25439#32791')'
                DataBinding.FieldName = 'RawQuantity'
                Width = 75
              end
              object colSumqty: TcxGridDBColumn
                Caption = #24635#25968#37327
                DataBinding.FieldName = 'sumqty'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn8: TcxGridDBColumn
                DataBinding.FieldName = 'subproduct'
                PropertiesClassName = 'TcxButtonEditProperties'
                Properties.Buttons = <
                  item
                    Default = True
                    Kind = bkEllipsis
                  end>
                Width = 45
              end
              object cxGridDBColumn9: TcxGridDBColumn
                DataBinding.FieldName = 'workprocid'
                Visible = False
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn10: TcxGridDBColumn
                DataBinding.FieldName = 'explan'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn11: TcxGridDBColumn
                DataBinding.FieldName = 'custom1'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn12: TcxGridDBColumn
                DataBinding.FieldName = 'custom2'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn13: TcxGridDBColumn
                DataBinding.FieldName = 'custom3'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn14: TcxGridDBColumn
                DataBinding.FieldName = 'custom4'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn15: TcxGridDBColumn
                DataBinding.FieldName = 'custom5'
                HeaderAlignmentHorz = taCenter
                Width = 60
              end
              object cxGridDBColumn16: TcxGridDBColumn
                DataBinding.FieldName = 'p_custom1'
                HeaderAlignmentHorz = taCenter
                Options.Editing = False
                Width = 60
              end
              object cxGridDBColumn17: TcxGridDBColumn
                DataBinding.FieldName = 'p_custom2'
                HeaderAlignmentHorz = taCenter
                Options.Editing = False
                Width = 60
              end
              object cxGridDBColumn18: TcxGridDBColumn
                DataBinding.FieldName = 'p_custom3'
                HeaderAlignmentHorz = taCenter
                Options.Editing = False
                Width = 60
              end
              object cxGridDBColumn19: TcxGridDBColumn
                DataBinding.FieldName = 'p_custom4'
                HeaderAlignmentHorz = taCenter
                Options.Editing = False
                Width = 60
              end
              object cxGridDBColumn20: TcxGridDBColumn
                DataBinding.FieldName = 'p_custom5'
                HeaderAlignmentHorz = taCenter
                Options.Editing = False
                Width = 60
              end
            end
            object lvlTree: TcxGridLevel
              GridView = viewTree
            end
          end
        end
      end
    end
  end
  inherited MainDataSource: TDataSource
    DataSet = cdsBomVer
    Left = 62
  end
  inherited qryDynDtl: TUniQuery
    Left = 8
    Top = 233
  end
  object cdsBomVer: TClientDataSet [5]
    Aggregates = <>
    Params = <>
    ProviderName = 'dspBomVer'
    AfterScroll = cdsBomVerAfterScroll
    OnNewRecord = cdsBomVerNewRecord
    Left = 120
    Top = 79
    object cdsBomVerbomid: TIntegerField
      FieldName = 'bomid'
    end
    object cdsBomVercode: TStringField
      FieldName = 'code'
      Size = 40
    end
    object cdsBomVername: TStringField
      FieldName = 'name'
      Size = 60
    end
    object cdsBomVerproductid: TIntegerField
      FieldName = 'productid'
    end
    object cdsBomVermanhour: TFloatField
      FieldName = 'manhour'
    end
    object cdsBomVerquantity: TFloatField
      FieldName = 'quantity'
    end
    object cdsBomVerqtypercent: TBooleanField
      FieldName = 'qtypercent'
    end
    object cdsBomVerpretime: TFloatField
      FieldName = 'pretime'
    end
    object cdsBomVerworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object cdsBomVermachineid: TIntegerField
      FieldName = 'machineid'
    end
    object cdsBomVerremark: TStringField
      FieldName = 'remark'
      Size = 200
    end
    object cdsBomVerstate: TIntegerField
      FieldName = 'state'
    end
    object cdsBomVercreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object cdsBomVercheck_by: TIntegerField
      FieldName = 'check_by'
    end
    object cdsBomVercreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object cdsBomVerupdate_time: TDateTimeField
      FieldName = 'update_time'
    end
    object cdsBomVercustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cdsBomVercustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cdsBomVercustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cdsBomVercustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cdsBomVercustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cdsBomVerdefbom: TBooleanField
      FieldName = 'defbom'
    end
    object cdsBomVercost: TFloatField
      FieldName = 'cost'
    end
    object cdsBomVersalereprice: TFloatField
      FieldName = 'salereprice'
    end
    object cdsBomVerpic: TBlobField
      FieldName = 'pic'
    end
    object cdsBomVerpostfix: TStringField
      FieldName = 'postfix'
      Size = 10
    end
    object cdsBomVerlength: TFloatField
      FieldName = 'length'
    end
    object cdsBomVerwidth: TFloatField
      FieldName = 'width'
    end
    object cdsBomVerheight: TFloatField
      FieldName = 'height'
    end
    object cdsBomVercustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cdsBomVercustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cdsBomVercustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cdsBomVercustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cdsBomVercustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cdsBomVercustom11: TFloatField
      FieldName = 'custom11'
    end
    object cdsBomVercustom12: TFloatField
      FieldName = 'custom12'
    end
    object cdsBomVercustom13: TFloatField
      FieldName = 'custom13'
    end
    object cdsBomVercustom14: TFloatField
      FieldName = 'custom14'
    end
    object cdsBomVercustom15: TFloatField
      FieldName = 'custom15'
    end
    object cdsBomVerdesignbomid: TIntegerField
      FieldName = 'designbomid'
    end
    object cdsBomVerpause: TBooleanField
      FieldName = 'pause'
    end
    object cdsBomVerlabourcost: TFloatField
      FieldName = 'labourcost'
    end
    object cdsBomVertem: TBooleanField
      FieldName = 'tem'
    end
    object cdsBomVertraderid: TIntegerField
      FieldName = 'traderid'
    end
    object cdsBomVercostupdate_time: TDateTimeField
      FieldName = 'costupdate_time'
    end
    object cdsBomVerpowercost: TFloatField
      FieldName = 'powercost'
    end
    object cdsBomVerrawcost: TFloatField
      FieldName = 'rawcost'
    end
    object cdsBomVerothercost: TFloatField
      FieldName = 'othercost'
    end
    object cdsBomVerelectricpowercost: TFloatField
      FieldName = 'electricpowercost'
    end
    object cdsBomVerassistantcost: TFloatField
      FieldName = 'assistantcost'
    end
    object cdsBomVersquare: TFloatField
      FieldName = 'square'
    end
    object cdsBomVercubage: TFloatField
      FieldName = 'cubage'
    end
  end
  object dsBomTrader: TDataSource [6]
    DataSet = cdsBomTrader
    Left = 544
    Top = 72
  end
  object cdsBomTrader: TClientDataSet [7]
    Aggregates = <>
    Params = <>
    ProviderName = 'dspBomTrader'
    OnNewRecord = cdsBomTraderNewRecord
    Left = 484
    Top = 71
    object cdsBomTraderbomid: TIntegerField
      FieldName = 'bomid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cdsBomTradertraderid: TIntegerField
      DisplayLabel = #23458#25143
      FieldName = 'traderid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cdsBomTraderproductid: TIntegerField
      FieldName = 'productid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cdsBomTraderremark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'remark'
      Size = 200
    end
  end
  object dspBomVer: TDataSetProvider [8]
    DataSet = qryBomVer
    UpdateMode = upWhereKeyOnly
    Left = 72
    Top = 55
  end
  object dspBomTrader: TDataSetProvider [9]
    DataSet = qryBomTrader
    UpdateMode = upWhereKeyOnly
    Left = 556
    Top = 128
  end
  object qryBomVer: TUniQuery [10]
    SQLInsert.Strings = (
      'INSERT INTO td_productbomver'
      
        '  (bomid, code, name, productid, manhour, quantity, qtypercent, ' +
        'pretime, worklineid, remark, state'
      ', create_by, check_by, create_time, update_time, traderid'
      
        ', powercost, labourcost, rawcost, othercost, electricpowercost, ' +
        'assistantcost'
      ', custom1, custom2, custom3, custom4, custom5'
      ', defbom, cost, salereprice, pic, postfix, pause'
      
        ', custom6, custom7, custom8, custom9, custom10, custom11, custom' +
        '12, custom13, custom14, custom15'
      ', length, width, height)'
      'VALUES'
      
        '  (:bomid, :code, :name, :productid, :manhour, :quantity, :qtype' +
        'rcent, :pretime, :worklineid, :remark, :state'
      ', :create_by, :check_by, :create_time, :update_time, :traderid'
      
        ', :powercost, :labourcost, :rawcost, :othercost, :electricpowerc' +
        'ost, :assistantcost'
      ', :custom1, :custom2, :custom3, :custom4, :custom5'
      ', :defbom, :cost, :salereprice, :pic, :postfix, :pause'
      
        ', :custom6, :custom7, :custom8, :custom9, :custom10, :custom11, ' +
        ':custom12, :custom13, :custom14, :custom15'
      ', :length, :width, :height)')
    SQLDelete.Strings = (
      'DELETE FROM td_productbomver'
      'WHERE'
      '  bomid = :Old_bomid')
    SQLUpdate.Strings = (
      'UPDATE td_productbomver'
      'SET'
      
        '  bomid = :bomid, code = :code, name = :name, productid = :produ' +
        'ctid, manhour = :manhour, traderid = :traderid'
      
        ', quantity = :quantity, qtypercent = :qtypercent, pretime = :pre' +
        'time, worklineid = :worklineid, remark = :remark, state = :state'
      
        ', create_by = :create_by, check_by = :check_by, create_time = :c' +
        'reate_time, update_time = :update_time'
      
        ', custom1 = :custom1, custom2 = :custom2, custom3 = :custom3, cu' +
        'stom4 = :custom4, custom5 = :custom5'
      
        ', defbom = :defbom, cost = :cost, salereprice = :salereprice, pi' +
        'c = :pic, postfix = :postfix, pause = :pause'
      
        ', custom6=:custom6, custom7=:custom7, custom8=:custom8, custom9=' +
        ':custom9, custom10=:custom10'
      
        ', custom11=:custom11, custom12=:custom12, custom13=:custom13, cu' +
        'stom14=:custom14, custom15=:custom15'
      ', length=:length, width=:width, height=:height'
      
        ', powercost=:powercost, labourcost=:labourcost, rawcost=:rawcost' +
        ', othercost=:othercost'
      
        ', electricpowercost=:electricpowercost, assistantcost=:assistant' +
        'cost'
      'WHERE'
      '  bomid = :Old_bomid')
    SQLLock.Strings = (
      'SELECT * FROM td_productbomver'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      '  bomid = :Old_bomid')
    SQLRefresh.Strings = (
      
        'SELECT bomid, code, name, productid, manhour, quantity, pretime,' +
        ' remark, state, create_by, check_by, create_time, update_time, c' +
        'ustom1, custom2, custom3, custom4, custom5, defbom, cost, salere' +
        'price, pic, postfix FROM td_productbomver'
      'WHERE'
      '  bomid = :Old_bomid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_productbomver')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 20
    Top = 67
    object qryBomVerbomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryBomVercode: TStringField
      FieldName = 'code'
      Size = 40
    end
    object qryBomVername: TStringField
      FieldName = 'name'
      Size = 60
    end
    object qryBomVerproductid: TIntegerField
      FieldName = 'productid'
    end
    object qryBomVermanhour: TFloatField
      FieldName = 'manhour'
    end
    object qryBomVerquantity: TFloatField
      FieldName = 'quantity'
    end
    object qryBomVerqtypercent: TBooleanField
      FieldName = 'qtypercent'
    end
    object qryBomVerpretime: TFloatField
      FieldName = 'pretime'
    end
    object qryBomVerworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object qryBomVermachineid: TIntegerField
      FieldName = 'machineid'
    end
    object qryBomVerremark: TStringField
      FieldName = 'remark'
      Size = 200
    end
    object qryBomVerstate: TIntegerField
      FieldName = 'state'
    end
    object qryBomVercreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object qryBomVercheck_by: TIntegerField
      FieldName = 'check_by'
    end
    object qryBomVercreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object qryBomVerupdate_time: TDateTimeField
      FieldName = 'update_time'
    end
    object qryBomVercustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryBomVercustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryBomVercustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryBomVercustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryBomVercustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryBomVerdefbom: TBooleanField
      FieldName = 'defbom'
    end
    object qryBomVercost: TFloatField
      FieldName = 'cost'
    end
    object qryBomVersalereprice: TFloatField
      FieldName = 'salereprice'
    end
    object qryBomVerpic: TBlobField
      FieldName = 'pic'
    end
    object qryBomVerpostfix: TStringField
      FieldName = 'postfix'
      Size = 10
    end
    object qryBomVerlength: TFloatField
      FieldName = 'length'
    end
    object qryBomVerwidth: TFloatField
      FieldName = 'width'
    end
    object qryBomVerheight: TFloatField
      FieldName = 'height'
    end
    object qryBomVercustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryBomVercustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryBomVercustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryBomVercustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryBomVercustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryBomVercustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryBomVercustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryBomVercustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryBomVercustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryBomVercustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryBomVerdesignbomid: TIntegerField
      FieldName = 'designbomid'
    end
    object qryBomVerpause: TBooleanField
      FieldName = 'pause'
    end
    object qryBomVerlabourcost: TFloatField
      FieldName = 'labourcost'
    end
    object qryBomVertem: TBooleanField
      FieldName = 'tem'
    end
    object qryBomVertraderid: TIntegerField
      FieldName = 'traderid'
    end
    object qryBomVercostupdate_time: TDateTimeField
      FieldName = 'costupdate_time'
    end
    object qryBomVerpowercost: TFloatField
      FieldName = 'powercost'
    end
    object qryBomVerrawcost: TFloatField
      FieldName = 'rawcost'
    end
    object qryBomVerothercost: TFloatField
      FieldName = 'othercost'
    end
    object qryBomVerelectricpowercost: TFloatField
      FieldName = 'electricpowercost'
    end
    object qryBomVerassistantcost: TFloatField
      FieldName = 'assistantcost'
    end
    object qryBomVersquare: TFloatField
      FieldName = 'square'
    end
    object qryBomVercubage: TFloatField
      FieldName = 'cubage'
    end
  end
  object qryBomTrader: TUniQuery [11]
    SQLInsert.Strings = (
      'INSERT INTO td_productbomtrader'
      '  (bomid, traderid, productid, remark)'
      'VALUES'
      '  (:bomid, :traderid, :productid, :remark)')
    SQLDelete.Strings = (
      'DELETE FROM td_productbomtrader'
      'WHERE'
      '  bomid = :Old_bomid AND traderid = :Old_traderid')
    SQLUpdate.Strings = (
      'UPDATE td_productbomtrader'
      'SET'
      
        '  bomid = :bomid, traderid = :traderid, productid = :productid, ' +
        'remark = :remark'
      'WHERE'
      '  bomid = :Old_bomid AND traderid = :Old_traderid')
    SQLLock.Strings = (
      'SELECT * FROM td_productbomtrader'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      '  bomid = :Old_bomid AND traderid = :Old_traderid')
    SQLRefresh.Strings = (
      
        'SELECT bomid, traderid, productid, remark FROM td_productbomtrad' +
        'er'
      'WHERE'
      '  bomid = :Old_bomid AND traderid = :Old_traderid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_productbomtrader where bomid=:bomid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 484
    Top = 131
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bomid'
        Value = 0
      end>
    object qryBomTraderbomid: TIntegerField
      FieldName = 'bomid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object qryBomTradertraderid: TIntegerField
      DisplayLabel = #23458#25143
      FieldName = 'traderid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object qryBomTraderproductid: TIntegerField
      FieldName = 'productid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object qryBomTraderremark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'remark'
      Size = 200
    end
  end
  object dsProduct: TDataSource [12]
    DataSet = cdsProduct
    Left = 268
    Top = 60
  end
  object cdsProduct: TClientDataSet [13]
    Aggregates = <>
    Params = <>
    Left = 204
    Top = 43
    object cdsProductproductid: TIntegerField
      FieldName = 'productid'
      OnChange = cdsProductproductidChange
    end
  end
  object qryBom: TUniQuery [14]
    SQLInsert.Strings = (
      'INSERT INTO td_productbom'
      
        '  (bomid, rawproductid, rawno, rawbomid, rawpercent, rawqty, was' +
        'terate, explan, orderno, partid, worklineid, workprocid, custom1' +
        ', custom2, custom3, custom4, custom5, create_by, traderid, lengt' +
        'h, width, height, custom6, custom7, custom8, custom9, custom10, ' +
        'custom11, custom12, custom13, custom14, custom15, lengthformulai' +
        'd, widthformulaid, heightformulaid, qtyformulaid, rawquantity)'
      'VALUES'
      
        '  (:bomid, :rawproductid, :rawno, :rawbomid, :rawpercent, :rawqt' +
        'y, :wasterate, :explan, :orderno, :partid, :worklineid, :workpro' +
        'cid, :custom1, :custom2, :custom3, :custom4, :custom5, :create_b' +
        'y, :traderid, :length, :width, :height, :custom6, :custom7, :cus' +
        'tom8, :custom9, :custom10, :custom11, :custom12, :custom13, :cus' +
        'tom14, :custom15, :lengthformulaid, :widthformulaid, :heightform' +
        'ulaid, :qtyformulaid, :rawquantity)')
    SQLDelete.Strings = (
      'DELETE FROM td_productbom'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND ra' +
        'wno = :Old_rawno')
    SQLUpdate.Strings = (
      'UPDATE td_productbom'
      'SET'
      
        '  bomid = :bomid, rawproductid = :rawproductid, rawno = :rawno, ' +
        'rawbomid = :rawbomid, rawpercent = :rawpercent, rawqty = :rawqty' +
        ', wasterate = :wasterate, explan = :explan, orderno = :orderno, ' +
        'partid = :partid, worklineid = :worklineid, workprocid = :workpr' +
        'ocid, custom1 = :custom1, custom2 = :custom2, custom3 = :custom3' +
        ', custom4 = :custom4, custom5 = :custom5, create_by = :create_by' +
        ', traderid = :traderid, length = :length, width = :width, height' +
        ' = :height, custom6 = :custom6, custom7 = :custom7, custom8 = :c' +
        'ustom8, custom9 = :custom9, custom10 = :custom10, custom11 = :cu' +
        'stom11, custom12 = :custom12, custom13 = :custom13, custom14 = :' +
        'custom14, custom15 = :custom15, lengthformulaid = :lengthformula' +
        'id, widthformulaid = :widthformulaid, heightformulaid = :heightf' +
        'ormulaid, qtyformulaid = :qtyformulaid, rawquantity = :rawquanti' +
        'ty'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND ra' +
        'wno = :Old_rawno')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select b.*'
      ',b.length*b.width as square,b.length*b.width*b.height as cubage'
      
        ',p.name p_name,p.code p_code,p.spec p_spec,p.kind p_kind,u.unitn' +
        'ame '
      
        '       ,p.custom1 p_custom1,p.custom2 p_custom2,p.custom3 p_cust' +
        'om3,p.custom4 p_custom4,p.custom5 p_custom5 '
      
        '       ,v.name rawbomname,t.name t_name, cast(null as varchar(20' +
        '0)) as subproduct'
      '       ,pt.name partname, pf.calcexpressshow formulaname'
      
        '       ,plf.calcexpressshow lformulaname, pwf.calcexpressshow wf' +
        'ormulaname, phf.calcexpressshow hformulaname'
      
        '       from td_productbom b join td_product p on b.rawproductid=' +
        'p.p_id'
      
        '       join td_unitprice u on b.rawproductid=u.productid and u.b' +
        'aseunit=1'
      '       left join td_productbomver v on b.rawbomid=v.bomid  '
      '       left join td_trader t on b.traderid=t.traderid'
      '       left join td_productbompart pt on b.partid=pt.id'
      '       left join td_productbomformula pf on b.qtyformulaid=pf.id'
      
        '       left join td_productbomformula plf on b.lengthformulaid=p' +
        'lf.id'
      
        '       left join td_productbomformula pwf on b.widthformulaid=pw' +
        'f.id  '
      
        '       left join td_productbomformula phf on b.heightformulaid=p' +
        'hf.id  '
      '       where b.bomid=:bomid'
      '       order by b.orderno')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.AutoPrepare = True
    Left = 60
    Top = 277
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bomid'
        Value = 0
      end>
    object qryBombomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryBomrawproductid: TIntegerField
      FieldName = 'rawproductid'
    end
    object qryBomrawno: TIntegerField
      FieldName = 'rawno'
    end
    object qryBomrawbomid: TIntegerField
      FieldName = 'rawbomid'
    end
    object qryBomrawqty: TFloatField
      FieldName = 'rawqty'
    end
    object qryBomwasterate: TFloatField
      FieldName = 'wasterate'
    end
    object qryBomexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryBomorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object qryBompartid: TIntegerField
      FieldName = 'partid'
    end
    object qryBomworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object qryBomworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object qryBomcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryBomcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryBomcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryBomcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryBomcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryBomcreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object qryBomtraderid: TIntegerField
      FieldName = 'traderid'
    end
    object qryBomlength: TFloatField
      FieldName = 'length'
    end
    object qryBomwidth: TFloatField
      FieldName = 'width'
    end
    object qryBomheight: TFloatField
      FieldName = 'height'
    end
    object qryBomcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryBomcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryBomcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryBomcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryBomcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryBomcustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryBomcustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryBomcustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryBomcustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryBomcustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryBomlengthformulaid: TIntegerField
      FieldName = 'lengthformulaid'
    end
    object qryBomwidthformulaid: TIntegerField
      FieldName = 'widthformulaid'
    end
    object qryBomheightformulaid: TIntegerField
      FieldName = 'heightformulaid'
    end
    object qryBomqtyformulaid: TIntegerField
      FieldName = 'qtyformulaid'
    end
    object qryBomrawquantity: TFloatField
      FieldName = 'rawquantity'
    end
    object qryBomrawpercent: TFloatField
      FieldName = 'rawpercent'
    end
    object qryBomp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object qryBomp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object qryBomp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object qryBomp_kind: TIntegerField
      FieldName = 'p_kind'
    end
    object qryBomunitname: TWideStringField
      FieldName = 'unitname'
      Size = 40
    end
    object qryBomp_custom1: TStringField
      FieldName = 'p_custom1'
      Size = 100
    end
    object qryBomp_custom2: TStringField
      FieldName = 'p_custom2'
      Size = 100
    end
    object qryBomp_custom3: TStringField
      FieldName = 'p_custom3'
      Size = 100
    end
    object qryBomp_custom4: TStringField
      FieldName = 'p_custom4'
      Size = 100
    end
    object qryBomp_custom5: TStringField
      FieldName = 'p_custom5'
      Size = 100
    end
    object qryBomrawbomname: TStringField
      FieldName = 'rawbomname'
      Size = 60
    end
    object qryBomt_name: TWideStringField
      FieldName = 't_name'
      Size = 80
    end
    object qryBomsubproduct: TStringField
      FieldName = 'subproduct'
      Size = 200
    end
    object qryBompartname: TWideStringField
      FieldName = 'partname'
      Size = 60
    end
    object qryBomformulaname: TWideStringField
      FieldName = 'formulaname'
      Size = 200
    end
    object qryBomlformulaname: TWideStringField
      FieldName = 'lformulaname'
      Size = 200
    end
    object qryBomwformulaname: TWideStringField
      FieldName = 'wformulaname'
      Size = 200
    end
    object qryBomhformulaname: TWideStringField
      FieldName = 'hformulaname'
      Size = 200
    end
    object qryBomsquare: TFloatField
      FieldName = 'square'
    end
    object qryBomcubage: TFloatField
      FieldName = 'cubage'
    end
  end
  object qryBomSub: TUniQuery [15]
    SQLInsert.Strings = (
      'INSERT INTO td_productbomsub'
      
        '  (bomid, rawproductid, rawno, subrawid, subbomid, rate, explan,' +
        ' productrawno)'
      'VALUES'
      
        '  (:bomid, :rawproductid, :rawno, :subrawid, :subbomid, :rate, :' +
        'explan, :productrawno)')
    SQLDelete.Strings = (
      'DELETE FROM td_productbomsub'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND su' +
        'brawid = :Old_subrawid')
    SQLUpdate.Strings = (
      'UPDATE td_productbomsub'
      'SET'
      
        '  bomid = :bomid, rawproductid = :rawproductid, rawno = :rawno, ' +
        'subrawid = :subrawid, subbomid = :subbomid, rate = :rate, explan' +
        ' = :explan, productrawno = :productrawno'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND su' +
        'brawid = :Old_subrawid')
    SQLLock.Strings = (
      'SELECT * FROM td_productbomsub'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND su' +
        'brawid = :Old_subrawid')
    SQLRefresh.Strings = (
      
        'SELECT bomid, rawproductid, rawno, subrawid, subbomid, rate, exp' +
        'lan, productrawno FROM td_productbomsub'
      'WHERE'
      
        '  bomid = :Old_bomid AND rawproductid = :Old_rawproductid AND su' +
        'brawid = :Old_subrawid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select m.*,p.code p_code,p.name p_name,p.spec p_spec,u.unitname,'
      '  b.rawqty*(1+b.wasterate/100)*m.rate as quantity'
      '  from td_productbomsub m'
      '  left join td_product p on m.subrawid=p.p_id'
      '  left join td_unitprice u on u.productid=p.p_id and baseunit=1'
      
        '  left join td_productbom b on b.bomid=m.bomid and m.rawproducti' +
        'd=b.rawproductid and m.productrawno=b.rawno'
      '  where m.bomid=:bomid'
      'order by m.rawno,m.subrawid')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    Left = 64
    Top = 349
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bomid'
        Value = 0
      end>
    object qryBomSubbomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryBomSubrawproductid: TIntegerField
      FieldName = 'rawproductid'
    end
    object qryBomSubrawno: TStringField
      FieldName = 'rawno'
      Size = 40
    end
    object qryBomSubsubrawid: TIntegerField
      FieldName = 'subrawid'
    end
    object qryBomSubsubbomid: TIntegerField
      FieldName = 'subbomid'
    end
    object qryBomSubrate: TFloatField
      FieldName = 'rate'
    end
    object qryBomSubexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryBomSubproductrawno: TIntegerField
      FieldName = 'productrawno'
    end
    object qryBomSublength: TFloatField
      FieldName = 'length'
    end
    object qryBomSubwidth: TFloatField
      FieldName = 'width'
    end
    object qryBomSubheight: TFloatField
      FieldName = 'height'
    end
    object qryBomSubp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object qryBomSubp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object qryBomSubp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object qryBomSubunitname: TWideStringField
      FieldName = 'unitname'
      Size = 40
    end
    object qryBomSubquantity: TFloatField
      FieldName = 'quantity'
    end
  end
  object cdsBom: TClientDataSet [16]
    Aggregates = <>
    Params = <>
    ProviderName = 'dspBom'
    BeforeInsert = cdsBomBeforeInsert
    AfterPost = cdsBomAfterPost
    AfterDelete = cdsBomAfterDelete
    AfterScroll = cdsBomAfterScroll
    OnNewRecord = cdsBomNewRecord
    Left = 148
    Top = 285
    object cdsBombomid: TIntegerField
      FieldName = 'bomid'
    end
    object cdsBomrawproductid: TIntegerField
      FieldName = 'rawproductid'
      OnChange = cdsBomrawproductidChange
    end
    object cdsBomrawno: TIntegerField
      FieldName = 'rawno'
    end
    object cdsBomrawbomid: TIntegerField
      FieldName = 'rawbomid'
    end
    object cdsBomrawqty: TFloatField
      FieldName = 'rawqty'
    end
    object cdsBomwasterate: TFloatField
      FieldName = 'wasterate'
    end
    object cdsBomexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object cdsBomorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object cdsBompartid: TIntegerField
      FieldName = 'partid'
    end
    object cdsBomworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object cdsBomworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object cdsBomcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cdsBomcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cdsBomcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cdsBomcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cdsBomcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cdsBomcreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object cdsBomtraderid: TIntegerField
      FieldName = 'traderid'
    end
    object cdsBomlength: TFloatField
      FieldName = 'length'
    end
    object cdsBomwidth: TFloatField
      FieldName = 'width'
    end
    object cdsBomheight: TFloatField
      FieldName = 'height'
    end
    object cdsBomcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cdsBomcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cdsBomcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cdsBomcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cdsBomcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cdsBomcustom11: TFloatField
      FieldName = 'custom11'
    end
    object cdsBomcustom12: TFloatField
      FieldName = 'custom12'
    end
    object cdsBomcustom13: TFloatField
      FieldName = 'custom13'
    end
    object cdsBomcustom14: TFloatField
      FieldName = 'custom14'
    end
    object cdsBomcustom15: TFloatField
      FieldName = 'custom15'
    end
    object cdsBomlengthformulaid: TIntegerField
      FieldName = 'lengthformulaid'
    end
    object cdsBomwidthformulaid: TIntegerField
      FieldName = 'widthformulaid'
    end
    object cdsBomheightformulaid: TIntegerField
      FieldName = 'heightformulaid'
    end
    object cdsBomqtyformulaid: TIntegerField
      FieldName = 'qtyformulaid'
    end
    object cdsBomrawquantity: TFloatField
      FieldName = 'rawquantity'
    end
    object cdsBomrawpercent: TFloatField
      FieldName = 'rawpercent'
    end
    object cdsBomp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object cdsBomp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object cdsBomp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object cdsBomp_kind: TIntegerField
      FieldName = 'p_kind'
    end
    object cdsBomunitname: TWideStringField
      FieldName = 'unitname'
      Size = 40
    end
    object cdsBomp_custom1: TStringField
      FieldName = 'p_custom1'
      Size = 100
    end
    object cdsBomp_custom2: TStringField
      FieldName = 'p_custom2'
      Size = 100
    end
    object cdsBomp_custom3: TStringField
      FieldName = 'p_custom3'
      Size = 100
    end
    object cdsBomp_custom4: TStringField
      FieldName = 'p_custom4'
      Size = 100
    end
    object cdsBomp_custom5: TStringField
      FieldName = 'p_custom5'
      Size = 100
    end
    object cdsBomrawbomname: TStringField
      FieldName = 'rawbomname'
      Size = 60
    end
    object cdsBomt_name: TWideStringField
      FieldName = 't_name'
      Size = 80
    end
    object cdsBomsubproduct: TStringField
      FieldName = 'subproduct'
      Size = 200
    end
    object cdsBompartname: TWideStringField
      FieldName = 'partname'
      Size = 60
    end
    object cdsBomformulaname: TWideStringField
      FieldName = 'formulaname'
      Size = 200
    end
    object cdsBomlformulaname: TWideStringField
      FieldName = 'lformulaname'
      Size = 200
    end
    object cdsBomwformulaname: TWideStringField
      FieldName = 'wformulaname'
      Size = 200
    end
    object cdsBomhformulaname: TWideStringField
      FieldName = 'hformulaname'
      Size = 200
    end
    object cdsBomsquare: TFloatField
      FieldName = 'square'
    end
    object cdsBomcubage: TFloatField
      FieldName = 'cubage'
    end
  end
  object dspBom: TDataSetProvider [17]
    DataSet = qryBom
    UpdateMode = upWhereKeyOnly
    BeforeUpdateRecord = dspBomBeforeUpdateRecord
    Left = 104
    Top = 265
  end
  object dsBom: TDataSource [18]
    DataSet = cdsBom
    Left = 192
    Top = 273
  end
  object qryWorkProc: TUniQuery [19]
    SQLInsert.Strings = (
      'INSERT INTO td_productbomProc'
      
        '  (bomid, pno, orderno, explan, workprocid, workshopid, workcent' +
        'erid, machineid, manhour, pretime, empid, custom1, custom2, cust' +
        'om3, custom4, custom5, custom6, custom7, custom8, custom9, custo' +
        'm10, custom11, custom12, custom13, custom14, custom15'
      ', price, unit, makeprice, makeqty, makeqtyformulaid)'
      'VALUES'
      
        '  (:bomid, :pno, :orderno, :explan, :workprocid, :workshopid, :w' +
        'orkcenterid, :machineid, :manhour, :pretime, :empid, :custom1, :' +
        'custom2, :custom3, :custom4, :custom5, :custom6, :custom7, :cust' +
        'om8, :custom9, :custom10, :custom11, :custom12, :custom13, :cust' +
        'om14, :custom15'
      ', :price, :unit, :makeprice, :makeqty, :makeqtyformulaid)')
    SQLDelete.Strings = (
      'DELETE FROM td_productbomProc'
      'WHERE'
      
        '  bomid = :Old_bomid AND workprocid = :Old_workprocid AND pno = ' +
        ':Old_pno')
    SQLUpdate.Strings = (
      'UPDATE td_productbomProc'
      'SET'
      
        '  bomid = :bomid, pno = :pno, orderno = :orderno, explan = :expl' +
        'an, workprocid = :workprocid, workshopid = :workshopid, workcent' +
        'erid = :workcenterid, machineid = :machineid, manhour = :manhour' +
        ', pretime = :pretime, empid = :empid, custom1 = :custom1, custom' +
        '2 = :custom2, custom3 = :custom3, custom4 = :custom4, custom5 = ' +
        ':custom5, custom6 = :custom6, custom7 = :custom7, custom8 = :cus' +
        'tom8, custom9 = :custom9, custom10 = :custom10, custom11 = :cust' +
        'om11, custom12 = :custom12, custom13 = :custom13, custom14 = :cu' +
        'stom14, custom15 = :custom15'
      
        ', price = :price, unit = :unit, makeprice = :makeprice, makeqty ' +
        '= :makeqty, makeqtyformulaid = :makeqtyformulaid'
      'WHERE'
      
        '  bomid = :Old_bomid AND workprocid = :Old_workprocid AND pno = ' +
        ':Old_pno')
    SQLLock.Strings = (
      'SELECT * FROM td_productbomProc'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      '  bomid = :Old_bomid AND workprocid = :Old_workprocid')
    SQLRefresh.Strings = (
      
        'SELECT bomid, pno, orderno, explan, workprocid, workshopid, work' +
        'centerid, machineid, manhour, pretime, empid, custom1, custom2, ' +
        'custom3, custom4, custom5, custom6, custom7, custom8, custom9, c' +
        'ustom10, custom11, custom12, custom13, custom14, custom15'
      
        ', price, unit, makeprice, makeqty, makeqtyformulaid FROM td_prod' +
        'uctbomProc'
      'WHERE'
      '  bomid = :Old_bomid AND workprocid = :Old_workprocid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select m.*,wp.code,wp.name,ws.name workshopname,wc.name centerna' +
        'me'
      '  from td_productbomProc m'
      '  left  join td_workproc wp on m.workprocid = wp.workprocid'
      '  left  join td_workshop ws on m.workshopid=ws.workshopid'
      '  left join td_workcenter wc on wc.workcenterid=m.workcenterid'
      '    where m.bomid=:Bomid'
      '  order by m.orderno')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    Left = 48
    Top = 437
    ParamData = <
      item
        DataType = ftInteger
        Name = 'Bomid'
        Value = 0
      end>
    object qryWorkProcbomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryWorkProcpno: TIntegerField
      FieldName = 'pno'
    end
    object qryWorkProcorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object qryWorkProcexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryWorkProcworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object qryWorkProcworkshopid: TIntegerField
      FieldName = 'workshopid'
    end
    object qryWorkProcworkcenterid: TIntegerField
      FieldName = 'workcenterid'
    end
    object qryWorkProcmachineid: TIntegerField
      FieldName = 'machineid'
    end
    object qryWorkProcmanhour: TFloatField
      FieldName = 'manhour'
    end
    object qryWorkProcpretime: TFloatField
      FieldName = 'pretime'
    end
    object qryWorkProcempid: TIntegerField
      FieldName = 'empid'
    end
    object qryWorkProccustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryWorkProccustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryWorkProccustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryWorkProccustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryWorkProccustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryWorkProccustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryWorkProccustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryWorkProccustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryWorkProccustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryWorkProccustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryWorkProccustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryWorkProccustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryWorkProccustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryWorkProccustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryWorkProccustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryWorkProcprice: TFloatField
      FieldName = 'price'
    end
    object qryWorkProccode: TStringField
      FieldName = 'code'
      Size = 40
    end
    object qryWorkProcname: TStringField
      FieldName = 'name'
      Size = 60
    end
    object qryWorkProcworkshopname: TStringField
      FieldName = 'workshopname'
      Size = 60
    end
    object qryWorkProccentername: TStringField
      FieldName = 'centername'
      Size = 60
    end
    object qryWorkProcunit: TStringField
      FieldName = 'unit'
    end
    object qryWorkProcmakeprice: TFloatField
      FieldName = 'makeprice'
    end
    object qryWorkProcmakeqty: TFloatField
      FieldName = 'makeqty'
    end
    object qryWorkProcmakeqtyformulaid: TIntegerField
      FieldName = 'makeqtyformulaid'
    end
  end
  object cdsWorkProc: TClientDataSet [20]
    Aggregates = <>
    Params = <>
    ProviderName = 'dspWorkProc'
    BeforeInsert = cdsWorkProcBeforeInsert
    AfterPost = cdsBomAfterPost
    AfterDelete = cdsBomAfterDelete
    OnNewRecord = cdsWorkProcNewRecord
    Left = 156
    Top = 441
    object cdsWorkProcbomid: TIntegerField
      FieldName = 'bomid'
    end
    object cdsWorkProcpno: TIntegerField
      FieldName = 'pno'
    end
    object cdsWorkProcorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object cdsWorkProcexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object cdsWorkProcworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object cdsWorkProcworkshopid: TIntegerField
      FieldName = 'workshopid'
    end
    object cdsWorkProcworkcenterid: TIntegerField
      FieldName = 'workcenterid'
    end
    object cdsWorkProcmachineid: TIntegerField
      FieldName = 'machineid'
    end
    object cdsWorkProcmanhour: TFloatField
      FieldName = 'manhour'
    end
    object cdsWorkProcpretime: TFloatField
      FieldName = 'pretime'
    end
    object cdsWorkProcempid: TIntegerField
      FieldName = 'empid'
    end
    object cdsWorkProccustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cdsWorkProccustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cdsWorkProccustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cdsWorkProccustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cdsWorkProccustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cdsWorkProccustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cdsWorkProccustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cdsWorkProccustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cdsWorkProccustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cdsWorkProccustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cdsWorkProccustom11: TFloatField
      FieldName = 'custom11'
    end
    object cdsWorkProccustom12: TFloatField
      FieldName = 'custom12'
    end
    object cdsWorkProccustom13: TFloatField
      FieldName = 'custom13'
    end
    object cdsWorkProccustom14: TFloatField
      FieldName = 'custom14'
    end
    object cdsWorkProccustom15: TFloatField
      FieldName = 'custom15'
    end
    object cdsWorkProcprice: TFloatField
      FieldName = 'price'
    end
    object cdsWorkProccode: TStringField
      FieldName = 'code'
      Size = 40
    end
    object cdsWorkProcname: TStringField
      FieldName = 'name'
      Size = 60
    end
    object cdsWorkProcworkshopname: TStringField
      FieldName = 'workshopname'
      Size = 60
    end
    object cdsWorkProccentername: TStringField
      FieldName = 'centername'
      Size = 60
    end
    object cdsWorkProcunit: TStringField
      FieldName = 'unit'
    end
    object cdsWorkProcmakeprice: TFloatField
      FieldName = 'makeprice'
    end
    object cdsWorkProcmakeqty: TFloatField
      FieldName = 'makeqty'
    end
    object cdsWorkProcmakeqtyformulaid: TIntegerField
      FieldName = 'makeqtyformulaid'
    end
  end
  object dspWorkProc: TDataSetProvider [21]
    DataSet = qryWorkProc
    UpdateMode = upWhereKeyOnly
    BeforeUpdateRecord = dspWorkProcBeforeUpdateRecord
    Left = 108
    Top = 425
  end
  object dsWorkProc: TDataSource [22]
    DataSet = cdsWorkProc
    Left = 200
    Top = 429
  end
  object cdsTree: TClientDataSet [23]
    Aggregates = <>
    Params = <>
    Left = 696
    Top = 361
    object IntegerField1: TIntegerField
      FieldName = 'bomid'
      ProviderFlags = []
    end
    object StringField1: TStringField
      DisplayLabel = #24207#21495
      FieldName = 'orderno'
      Size = 40
    end
    object StringField2: TStringField
      DisplayLabel = #26448#26009#32534#30721
      FieldName = 'code'
      Size = 40
    end
    object cdsTreename: TStringField
      DisplayLabel = #26448#26009#21517#31216
      FieldName = 'name'
      Size = 60
    end
    object IntegerField2: TIntegerField
      DisplayLabel = #26448#26009#21517#31216
      FieldName = 'rawproductid'
      OnChange = cdsBomrawproductidChange
    end
    object WideStringField1: TWideStringField
      DisplayLabel = #35268#26684
      FieldName = 'spec'
      Size = 60
    end
    object WideStringField2: TWideStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      ProviderFlags = []
      Size = 40
    end
    object BCDField1: TFloatField
      DisplayLabel = #26448#26009#25968#37327
      FieldName = 'rawqty'
    end
    object BCDField2: TFloatField
      DisplayLabel = #24223#21697#29575'%'
      FieldName = 'wasterate'
    end
    object StringField3: TStringField
      DisplayLabel = #26367#20195#21697
      FieldKind = fkCalculated
      FieldName = 'subproduct'
      ProviderFlags = []
      Size = 200
      Calculated = True
    end
    object StringField4: TStringField
      DisplayLabel = #35828#26126
      FieldName = 'explan'
      Size = 200
    end
    object IntegerField3: TIntegerField
      FieldName = 'worklineid'
    end
    object IntegerField4: TIntegerField
      DisplayLabel = #24037#24207
      FieldName = 'workprocid'
    end
    object IntegerField5: TIntegerField
      FieldName = 'rawno'
    end
    object StringField5: TStringField
      DisplayLabel = #33258#23450#20041'1'
      FieldName = 'custom1'
      Size = 200
    end
    object StringField6: TStringField
      DisplayLabel = #33258#23450#20041'2'
      FieldName = 'custom2'
      Size = 200
    end
    object StringField7: TStringField
      DisplayLabel = #33258#23450#20041'3'
      FieldName = 'custom3'
      Size = 200
    end
    object StringField8: TStringField
      DisplayLabel = #33258#23450#20041'4'
      FieldName = 'custom4'
      Size = 200
    end
    object StringField9: TStringField
      DisplayLabel = #33258#23450#20041'5'
      FieldName = 'custom5'
      Size = 200
    end
    object StringField10: TStringField
      DisplayLabel = #36135#21697#33258#23450#20041'1'
      FieldName = 'p_custom1'
      ProviderFlags = []
      Size = 100
    end
    object StringField11: TStringField
      DisplayLabel = #36135#21697#33258#23450#20041'2'
      FieldName = 'p_custom2'
      ProviderFlags = []
      Size = 100
    end
    object StringField12: TStringField
      DisplayLabel = #36135#21697#33258#23450#20041'3'
      FieldName = 'p_custom3'
      ProviderFlags = []
      Size = 100
    end
    object StringField13: TStringField
      DisplayLabel = #36135#21697#33258#23450#20041'4'
      FieldName = 'p_custom4'
      ProviderFlags = []
      Size = 100
    end
    object StringField14: TStringField
      DisplayLabel = #36135#21697#33258#23450#20041'5'
      FieldName = 'p_custom5'
      ProviderFlags = []
      Size = 100
    end
    object cdsTreeproductid: TIntegerField
      FieldName = 'productid'
    end
    object cdsTreevp_name: TStringField
      FieldName = 'vp_name'
      Size = 60
    end
    object cdsTreevp_code: TStringField
      FieldName = 'vp_code'
      Size = 40
    end
    object cdsTreerawquantity: TFloatField
      FieldName = 'rawquantity'
    end
    object cdsTreesumqty: TFloatField
      FieldName = 'sumqty'
    end
  end
  object dsTree: TDataSource [24]
    DataSet = cdsTree
    Left = 696
    Top = 409
  end
  object dlgSaveExportExcel: TSaveDialog [25]
    Filter = 'Excel|.xls'
    Left = 637
    Top = 5
  end
  object cdsDouble: TClientDataSet [26]
    Aggregates = <>
    FieldDefs = <>
    IndexDefs = <>
    Params = <>
    StoreDefs = True
    Left = 512
    Top = 444
    object cdsDoublekeyid1: TIntegerField
      FieldName = 'keyid1'
    end
    object cdsDoublekeyid2: TIntegerField
      FieldName = 'keyid2'
    end
  end
  object cdsCircle: TClientDataSet [27]
    Aggregates = <>
    Params = <>
    Left = 420
    Top = 444
    object IntegerField6: TIntegerField
      FieldName = 'productid'
    end
    object IntegerField7: TIntegerField
      FieldName = 'rawproductid'
      Required = True
      OnValidate = IntegerField7Validate
    end
    object FloatField1: TFloatField
      FieldName = 'QUANTITY'
    end
    object FloatField2: TFloatField
      FieldName = 'WASTERATE'
    end
    object StringField15: TStringField
      FieldName = 'p_code'
      Size = 32
    end
    object StringField16: TStringField
      FieldName = 'p_name'
      Size = 64
    end
    object SmallintField1: TSmallintField
      FieldName = 'KIND'
    end
    object StringField17: TStringField
      FieldName = 'p_spec'
      Size = 64
    end
    object StringField18: TStringField
      FieldName = 'UNITNAME'
      Size = 64
    end
    object cdsCirclerawbomid: TIntegerField
      FieldName = 'rawbomid'
    end
  end
  object pmRawList: TPopupMenu [28]
    OnPopup = pmRawListPopup
    Left = 310
    Top = 236
    object muAdd: TMenuItem
      Caption = #22686#21152
      OnClick = muAddClick
    end
    object mniDel: TMenuItem
      Caption = #21024#38500
      OnClick = mniDelClick
    end
    object muCopyDetail: TMenuItem
      Caption = #22797#21046#26126#32454
      Visible = False
    end
    object muParseDetail: TMenuItem
      Caption = #31896#36148#26126#32454
      Visible = False
    end
    object N3: TMenuItem
      Caption = '-'
    end
    object mniDelAll: TMenuItem
      Caption = #20840#21024
      OnClick = mniDelAllClick
    end
    object mniPartSub: TMenuItem
      Caption = '-'
    end
    object mniListSub: TMenuItem
      Caption = #26367#20195#21697
      OnClick = mniListSubClick
    end
  end
  object pmWorkProc: TPopupMenu [29]
    OnPopup = pmWorkProcPopup
    Left = 474
    Top = 272
    object muAddProc: TMenuItem
      Caption = #22686#21152
      OnClick = muAddProcClick
    end
    object muDelProc: TMenuItem
      Caption = #21024#38500
      OnClick = muDelProcClick
    end
    object MenuItem3: TMenuItem
      Caption = #22797#21046#26126#32454
      Visible = False
    end
    object MenuItem4: TMenuItem
      Caption = #31896#36148#26126#32454
      Visible = False
    end
    object MenuItem5: TMenuItem
      Caption = '-'
    end
    object muDelAllProc: TMenuItem
      Caption = #20840#21024
      OnClick = muDelAllProcClick
    end
  end
  object qryUpdate: TUniQuery [30]
    Connection = MainDM.UniConn
    Left = 300
    Top = 457
  end
  object pmBomVer: TPopupMenu [31]
    Images = MainDM.imgList
    OnPopup = pmBomVerPopup
    Left = 300
    Top = 124
    object muBomVerNew: TMenuItem
      Caption = #26032#22686#29256#26412
      OnClick = muBomVerNewClick
    end
    object muBomVerDelete: TMenuItem
      Caption = #21024#38500#29256#26412
      OnClick = muBomVerDeleteClick
    end
    object muBomVerPause: TMenuItem
      Caption = #20572#29992#29256#26412
      OnClick = muBomVerPauseClick
    end
    object N1: TMenuItem
      Caption = '-'
    end
    object muBomVerCopy: TMenuItem
      Caption = #22797#21046#29256#26412
      OnClick = muBomVerCopyClick
    end
    object N2: TMenuItem
      Caption = '-'
    end
    object muBomVerAddPic: TMenuItem
      Caption = #38468#20214#22270#29255
      OnClick = muBomVerAddPicClick
    end
    object N4: TMenuItem
      Caption = '-'
    end
    object muRefreshBaseData: TMenuItem
      Caption = #21047#26032#36164#26009
      OnClick = muRefreshBaseDataClick
    end
    object muDefPart: TMenuItem
      Caption = '-'
    end
    object muDefVer: TMenuItem
      Caption = #35774#32622#20026#26631#20934#29256#26412
      OnClick = muDefVerClick
    end
    object muGetRawCost: TMenuItem
      Caption = #26356#26032#26448#26009#25104#26412#21442#32771#36827#20215
      OnClick = muGetRawCostClick
    end
    object muGetRawCostDepot: TMenuItem
      Tag = 1
      Caption = #26356#26032#26448#26009#25104#26412#24211#23384#25104#26412
      OnClick = muGetRawCostClick
    end
  end
  object dlgOpenPicture: TOpenPictureDialog [32]
    Filter = 
      'All (*.png;*.jpg;*.jpeg;*.bmp;*.ico;*.emf;*.wmf,*.dwg,*.dwf)|*.p' +
      'ng;*.jpg;*.jpeg;*.bmp;*.ico;*.emf;*.wmf,*.dwg,*.dwf|PNG graphics' +
      ' from DevExpress (*.png)|*.png|JPEG Image File (*.jpg)|*.jpg|JPE' +
      'G Image File (*.jpeg)|*.jpeg|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)' +
      '|*.ico|Enhanced Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|' +
      'AutoCAD(*.dwg)|*.dwg|AutoCAD(*.dwf)|*.dwf'
    Left = 704
    Top = 15
  end
  object dspBomSub: TDataSetProvider [33]
    DataSet = qryBomSub
    Left = 116
    Top = 362
  end
  object cdsBomSub: TClientDataSet [34]
    Aggregates = <>
    Params = <>
    ProviderName = 'dspBomSub'
    AfterPost = cdsBomAfterPost
    AfterDelete = cdsBomAfterDelete
    OnNewRecord = cdsBomSubNewRecord
    Left = 176
    Top = 346
    object cdsBomSubbomid: TIntegerField
      FieldName = 'bomid'
    end
    object cdsBomSubrawproductid: TIntegerField
      DisplayWidth = 80
      FieldName = 'rawproductid'
    end
    object cdsBomSubrawno: TStringField
      FieldName = 'rawno'
      Size = 40
    end
    object cdsBomSubsubrawid: TIntegerField
      DisplayLabel = #26367#20195#21697#21517#31216
      FieldName = 'subrawid'
      OnChange = cdsBomSubsubrawidChange
    end
    object cdsBomSubsubbomid: TIntegerField
      DisplayLabel = #26367#20195#21697#29289#26009#29256#26412
      FieldName = 'subbomid'
    end
    object cdsBomSubrate: TFloatField
      DisplayLabel = #26367#20195#27604#29575
      DisplayWidth = 50
      FieldName = 'rate'
      OnChange = cdsBomSubrateChange
    end
    object cdsBomSubexplan: TStringField
      DisplayLabel = #35828#26126
      DisplayWidth = 120
      FieldName = 'explan'
      Size = 200
    end
    object cdsBomSubproductrawno: TIntegerField
      FieldName = 'productrawno'
    end
    object cdsBomSubp_code: TStringField
      DisplayLabel = #26367#20195#21697#32534#30721
      DisplayWidth = 80
      FieldName = 'p_code'
      Size = 40
    end
    object cdsBomSubp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object cdsBomSubp_spec: TWideStringField
      DisplayLabel = #35268#26684
      DisplayWidth = 100
      FieldName = 'p_spec'
      Size = 60
    end
    object cdsBomSubunitname: TWideStringField
      DisplayLabel = #21333#20301
      DisplayWidth = 50
      FieldName = 'unitname'
      Size = 40
    end
    object cdsBomSubquantity: TFloatField
      DisplayLabel = #25968#37327
      DisplayWidth = 60
      FieldName = 'quantity'
    end
  end
  object qryProductList: TUniQuery [35]
    Connection = MainDM.UniConn
    Left = 456
    Top = 359
  end
  object dsProductList: TDataSource [36]
    DataSet = qryProductList
    Left = 536
    Top = 357
  end
  inherited styColor: TcxStyleRepository
    Left = 8
    Top = 292
    PixelsPerInch = 96
  end
  object pmTem: TPopupMenu
    OnPopup = pmTemPopup
    Left = 560
    Top = 38
    object muLoadTem: TMenuItem
      Caption = #24341#20837#27169#29256
      Hint = #24341#29992#27169#29256#26032#22686#29289#26009#28165#21333#29256#26412
      OnClick = muLoadTemClick
    end
    object muLoadTemDtl: TMenuItem
      Caption = #24341#20837#27169#29256#26126#32454
      Hint = #24341#29992#27169#29256#29289#26009#26126#32454#21040#24403#21069#29289#26009#28165#21333
      OnClick = muLoadTemDtlClick
    end
    object muSaveTem: TMenuItem
      Caption = #20445#23384#20026#27169#29256
      Hint = #35774#32622#24403#21069#29289#26009#28165#21333#29256#26412#20026#27169#29256
      OnClick = muSaveTemClick
    end
    object muTemPart: TMenuItem
      Caption = '-'
    end
    object muDelTem: TMenuItem
      Caption = #21024#38500#27169#29256
      OnClick = muDelTemClick
    end
    object muDelCurrTem: TMenuItem
      Caption = #21024#38500#24403#21069#27169#29256
      OnClick = muDelCurrTemClick
    end
  end
end
